package hu.tortavar.client.ui;

import com.google.gwt.core.client.GWT;
import com.google.gwt.uibinder.client.UiBinder;
import com.google.gwt.uibinder.client.UiField;
import com.google.gwt.user.client.ui.Composite;
import com.google.gwt.user.client.ui.Image;
import com.google.gwt.user.client.ui.Widget;

public class NewsRender extends Composite{

	private static NewsRenderUiBinder uiBinder = GWT
			.create(NewsRenderUiBinder.class);

	interface NewsRenderUiBinder extends UiBinder<Widget, NewsRender> {
	}

	@UiField Image news_image;
	@UiField NewsRenderHTML news_text;
	
	
	public NewsRender() {
		initWidget(uiBinder.createAndBindUi(this));
	}

	public NewsRender(String image, String cim, String leiras) {
		initWidget(uiBinder.createAndBindUi(this));
		news_image.setUrl(image);
		news_text.setNewsRenderHTML(cim, leiras);
	}
	
	public NewsRender(String image) {
		initWidget(uiBinder.createAndBindUi(this));
		news_image.setUrl(image);
	}
}
